package com.jeesite.modules.task.status.entity;

import javax.validation.constraints.Size;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;
import com.jeesite.common.entity.BaseEntity;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 任务状态变更表Entity
 * @author zrr
 * @version 2022-03-02
 */
@Table(name="dc_sup_task_status", alias="a", label="任务状态变更表信息", columns={
		@Column(name="id", attrName="id", label="主键", isPK=true),
		@Column(name="target_id", attrName="targetId", label="目标id", comment="目标id(task_id,feedback_id)"),
		@Column(name="target_type", attrName="targetType", label="目标类型", comment="目标类型（1任务部署、2任务分发、3反馈）"),
		@Column(name="status_code", attrName="statusCode", label="状态编码"),
		@Column(name="status_name", attrName="statusName", label="状态名称", queryType=QueryType.LIKE),
		@Column(name="change_by", attrName="changeBy", label="变更人"),
		@Column(name="change_time", attrName="changeTime", label="变更时间"),
		@Column(name="create_by", attrName="createBy", label="创建人", isUpdate=false, isQuery=false),
		@Column(name="create_time", attrName="createTime", label="创建时间"),
		@Column(name="update_by", attrName="updateBy", label="更新人", isQuery=false),
		@Column(name="update_time", attrName="updateTime", label="更新时间"),
		@Column(name="remarks", attrName="remarks", label="备注", queryType=QueryType.LIKE),
		@Column(includeEntity=BaseEntity.class),
		@Column(name="remarks1", attrName="remarks1", label="备用字段1", queryType=QueryType.LIKE, isUpdateForce=true),
		@Column(name="remarks2", attrName="remarks2", label="备用字段2", queryType=QueryType.LIKE),
		@Column(name="remarks3", attrName="remarks3", label="备用字段3", queryType=QueryType.LIKE),
		@Column(name="remarks4", attrName="remarks4", label="备用字段4", queryType=QueryType.LIKE),
	}, orderBy="a.id DESC"
)
public class DcSupTaskStatus extends DataEntity<DcSupTaskStatus> {
	
	private static final long serialVersionUID = 1L;
	 /**
	 * 目标id(task_id,feedback_id)
	 */
	private String targetId;
	 /**
	 * 目标类型（1任务部署、2任务分发、3反馈）
	 */
	private String targetType;
	 /**
	 * 状态编码
	 */
	private String statusCode;
	 /**
	 * 状态名称
	 */
	private String statusName;
	 /**
	 * 变更人
	 */
	private String changeBy;
	 /**
	 * 变更时间
	 */
	private Date changeTime;
	 /**
	 * 创建时间
	 */
	private Date createTime;
	 /**
	 * 更新时间
	 */
	private Date updateTime;
	 /**
	 * 备用字段1
	 */
	private Long remarks1;
	 /**
	 * 备用字段2
	 */
	private String remarks2;
	 /**
	 * 备用字段3
	 */
	private String remarks3;
	 /**
	 * 备用字段4
	 */
	private String remarks4;
	
	public DcSupTaskStatus() {
		this(null);
	}

	public DcSupTaskStatus(String id){
		super(id);
	}
	
	@Size(min=0, max=64, message="目标id长度不能超过 64 个字符")
	public String getTargetId() {
		return targetId;
	}

	public void setTargetId(String targetId) {
		this.targetId = targetId;
	}
	
	@Size(min=0, max=10, message="目标类型长度不能超过 10 个字符")
	public String getTargetType() {
		return targetType;
	}

	public void setTargetType(String targetType) {
		this.targetType = targetType;
	}
	
	@Size(min=0, max=10, message="状态编码长度不能超过 10 个字符")
	public String getStatusCode() {
		return statusCode;
	}

	public void setStatusCode(String statusCode) {
		this.statusCode = statusCode;
	}
	
	@Size(min=0, max=64, message="状态名称长度不能超过 64 个字符")
	public String getStatusName() {
		return statusName;
	}

	public void setStatusName(String statusName) {
		this.statusName = statusName;
	}
	
	@NotBlank(message="变更人不能为空")
	@Size(min=0, max=64, message="变更人长度不能超过 64 个字符")
	public String getChangeBy() {
		return changeBy;
	}

	public void setChangeBy(String changeBy) {
		this.changeBy = changeBy;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="变更时间不能为空")
	public Date getChangeTime() {
		return changeTime;
	}

	public void setChangeTime(Date changeTime) {
		this.changeTime = changeTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="创建时间不能为空")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="更新时间不能为空")
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	
	public Long getRemarks1() {
		return remarks1;
	}

	public void setRemarks1(Long remarks1) {
		this.remarks1 = remarks1;
	}
	
	@Size(min=0, max=200, message="备用字段2长度不能超过 200 个字符")
	public String getRemarks2() {
		return remarks2;
	}

	public void setRemarks2(String remarks2) {
		this.remarks2 = remarks2;
	}
	
	@Size(min=0, max=200, message="备用字段3长度不能超过 200 个字符")
	public String getRemarks3() {
		return remarks3;
	}

	public void setRemarks3(String remarks3) {
		this.remarks3 = remarks3;
	}
	
	@Size(min=0, max=200, message="备用字段4长度不能超过 200 个字符")
	public String getRemarks4() {
		return remarks4;
	}

	public void setRemarks4(String remarks4) {
		this.remarks4 = remarks4;
	}
	
}